-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FTS: Hybrid search query pipeline #42885
FTS: Hybrid search query pipeline #42885
Conversation
API change check APIView has identified API level changes in this PR and created following API reviews. |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java
Outdated
Show resolved
Hide resolved
...zure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosQueryRequestOptionsImpl.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/hybridsearch/HybridSearchQueryResult.java
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/hybridsearch/HybridSearchQueryResult.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/hybridsearch/HybridSearchQueryResult.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/hybridsearch/HybridSearchQueryResult.java
Outdated
Show resolved
Hide resolved
.../com/azure/cosmos/implementation/query/hybridsearch/GlobalFullTextSearchQueryStatistics.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/hybridsearch/FullTextQueryStatistics.java
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/QueryFeature.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/azure/cosmos/implementation/query/PipelinedQueryExecutionContextBase.java
Show resolved
Hide resolved
.../main/java/com/azure/cosmos/implementation/query/PipelinedDocumentQueryExecutionContext.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/azure/cosmos/implementation/query/PartitionedQueryExecutionInfoInternal.java
Show resolved
Hide resolved
...osmos/src/main/java/com/azure/cosmos/implementation/query/PartitionedQueryExecutionInfo.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookg good overall - but left few comments that need to be addressed before merge.
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/HybridSearchQueryTest.java
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/HybridSearchQueryTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java
Outdated
Show resolved
Hide resolved
...zure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosQueryRequestOptionsImpl.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Show resolved
Hide resolved
...mos/src/main/java/com/azure/cosmos/implementation/query/HybridSearchBadRequestException.java
Outdated
Show resolved
Hide resolved
...in/java/com/azure/cosmos/implementation/query/HybridSearchDocumentQueryExecutionContext.java
Show resolved
Hide resolved
...mos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/QueryPlanRetriever.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/HybridSearchQueryTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/HybridSearchQueryTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/HybridSearchQueryTest.java
Show resolved
Hide resolved
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
...zure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosQueryRequestOptionsImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thanks!
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextFactory.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
/check-enforcer override |
Description
This PR adds Full text search and hybrid search support.
HybridSearchDocumentQueryExecutionContext
HybridSearch
HybridSearchQueryInfo
Design doc
FTS queries supported now:
SELECT TOP 50 c.id, c.abstract, c.title FROM c WHERE FullTextContains(c.abstract, 'quantum')
SELECT TOP 50 c.id, c.abstract, c.title FROM c WHERE FullTextContainsAll(c.abstract, 'quantum', 'theory')
SELECT TOP 50 c.id, c.abstract, c.title FROM c WHERE FullTextContainsAny(c.abstract, 'quantum', 'theory')
SELECT TOP 50 c.id, c.abstract, c.title FROM c ORDER BY RANK FullTextScore(c.abstract, ['quantum', 'theory'])
SELECT TOP 50 c.id, c.abstract, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.abstract, ['quantum', 'theory']), FullTextScore(c.abstract, ['https://github.com/Azure/azure-sdk-for-java/issues/43011model']))
SELECT TOP 50 c.id, c.abstract, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.abstract, ['quantum', 'theory']), FullTextScore(c.abstract, ['model']), VectorDistance(c.Embedding, [%s]))",vector)
Hybrid Search queries guide
Follow ups to this PR:
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines